// 日报告请求参数
export interface DayReportParams {
  date: string; // 日期，如 "today"
  ishuozhuorfenlei: number; // 货主或分类ID
  limit: number; // 限制数量
  page: number; // 页码
}

// 二级分类请求参数
export interface CategoryTwoParams {
  name: number; // 分类ID
  page: number; // 页码
  limit: number; // 限制数量
}

// 商品单位项
export interface GoodsUnitItem {
  id: number;
  shouyin_id: number;
  name: string;
  unit: string | null;
  num: string;
  relation: string;
  goods_id: number;
}

// 商品单位请求参数
export interface GoodsUnitParams {
  data: GoodsUnitItem[];
  unit: string;
  editShangpinId: string;
  chooseHeaderIndex: number;
}

// 单位数据项
export interface UnitDataItem {
  id: number;
  name: string;
  weight_type: number;
  is_default: number;
  is_delete: number;
  sort: number;
  admin_id: number | null;
  delete_time: string | null;
}

// 附加费请求参数
export type FujiafeiParams = string[]; // 空数组

// 附加费项
export interface FujiafeiItem {
  id: number;
  name: string;
  rate: number;
  type: string;
  method: string;
  shouyin_id: number;
  time: string;
  admin_id: number;
  total: number;
}

// 子分类项
export interface CategoryChild {
  id: number;
  name: string;
  parent_id: number;
  desk_show: number;
  sort_order: number;
}

// 分类项
export interface CategoryItem {
  id: number;
  name: string;
  desk_show: number;
  parent_id: number;
  level: number;
  sort_order: number;
  child: CategoryChild[];
}

// 二级分类项
export interface CategoryTwoItem {
  id: number;
  name: string;
  desk_show: number;
  parent_id: number;
  level: number;
  sort_order: number;
}

// 分类列表响应数据
export interface CategoryListData {
  total: number;
  per_page: string;
  current_page: number;
  last_page: number;
  data: CategoryItem[];
}

// 二级分类列表响应数据
export interface CategoryTwoListData {
  total: number;
  per_page: number;
  current_page: number;
  last_page: number;
  data: CategoryTwoItem[];
}

// 分类列表响应
export interface DayReportResponse {
  code: number;
  msg: string;
  time: string;
  data: CategoryListData;
}

// 二级分类列表响应
export interface CategoryTwoResponse {
  code: number;
  msg: string;
  time: string;
  data: CategoryTwoListData;
}

// 商品单位响应
export interface GoodsUnitResponse {
  code: number;
  msg: string;
  time: string;
  data: GoodsUnitItem[];
}

// 单位数据响应
export interface UnitDataResponse {
  code: number;
  msg: string;
  time: string;
  data: UnitDataItem[];
}

// 附加费响应
export interface FujiafeiResponse {
  code: number;
  msg: string;
  time: string;
  data: FujiafeiItem[];
}
